<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> 
<head>
<%@ include file="/WEB-INF/jsp/include/easyui.jsp" %>
<%@ include file="/WEB-INF/jsp/include/pForm.jsp" %>
<%@ include file="/WEB-INF/jsp/include/easyui-layui-upload.jsp" %>
<script src="/plug-in/jquery-easyui-1.5.1/plugins/jquery.choosebox.js"></script>
<title>立项管理新增页面</title>
<script>
$(function(){
	fn.resetForm();
});
function onOrgNoSelect(record){
	$('input[name=department]').val(record.orgName);	       
}
</script>
</head>
<body>
	<div class="easyui-panel" data-options="fit:true,border:false" style="padding:10px;">
		<!-- 替换自动form表单 -->
		<form id="easyuiForm" method="post" action="/console/project/rewrite/newAdd"  style="width:750px;"  >
		 <!--类名属性及默认主键id-->
		 <input type="hidden" name="className" value="com.fs.jzzn.pojo.Project" />
		 <input type="hidden" name="id" value="" />
		 <input type="hidden" name="createrId" value="${SESSION_USER.user.id}" />
		 <input type="hidden"  name="department" value="" />
		 <input type="hidden"  name="processInstanceId" value="" />
		 
		 <div style="margin-bottom:20px">
		  <input class="easyui-choosebox easyui-validatebox" name="pNo" style="width:240px;"   data-options="label:'路段编号:',boxWidth:500,boxHeight:400,boxTitle:'自动生成项目编号',textField:'pNo',valueField:'pNo',modleName:'autoPno',required:true,readonly:false "/>
		  <input class="easyui-textbox easyui-validatebox" name="pRoad" style="width:480px;" data-options="label:'工程段落:',required:true,validType:'length[0,100]'" />
		 </div>
		 
		  <div style="margin-bottom:20px">
		  <input class="easyui-textbox easyui-validatebox" name="url" style="width:240px;" data-options="label:'云储存:',required:true" />
		  <select class="easyui-combobox" name="pName" style="width:485px;" data-options="label:'项目名称:',required:true" 
				url="/console/newProject/combobox?textField=pName&valueField=pName" >
		   </select>
		 </div>
		 
		 
		 <div style="margin-bottom:20px">
		 	<select class="easyui-combobox" name="pType" style="width:240px;" data-options="label:'专业类别:' ,required:true,prompt:'选择下拉选项或自定义'" 
				url="/console/combobox?valueField=dicName&textField=dicName&modleName=dictionary&pCode=A2&pCode_searchType=eq" >
		   </select>
		   <input class="easyui-textbox easyui-validatebox" name="contractNo" style="width:485px;" data-options="label:'订单编号:',validType:'length[0,100]',prompt:'订单未出时暂时不填写'" />
		 </div>
		 
		 
		  <div style="margin-bottom:20px">
		  <input class="easyui-numberbox easyui-validatebox" name="budgetMoney" style="width:240px;" data-options="label:'立项预算:',precision:2,required:true" />
		  <input class="easyui-numberbox easyui-validatebox" name="actualMoney" style="width:240px;" data-options="label:'完工预算:',precision:2" />
		  <!-- 
		  <input class="easyui-textbox easyui-validatebox" name="status" value="新建" style="width:240px;" data-options="label:'项目状态:'" readonly="readonly" />
		   -->
		   <select class="easyui-combobox" name="status" style="width:240px;"  data-options="label:'项目状态:' ,required:true" 
				url="/console/combobox?valueField=dicName&textField=dicName&modleName=dictionary&pCode=A4&pCode_searchType=eq&text=新建" >
		   	</select>
		 </div>
		 
		  <div style="margin-bottom:20px">
		  	   <select class="easyui-combobox" name="pm" style="width:240px;" data-options="label:'项目经理:' ,required:true" 
				url="/console/user/combobox?duty=项目经理&duty_searchType=like&textField=nickName&valueField=nickName" >
		   	 </select>
		  
		  	 <select class="easyui-combobox" name="ppm" style="width:240px;" data-options="label:'工程经理:' ,required:true" 
				url="/console/user/combobox?duty=工程经理&duty_searchType=like&textField=nickName&valueField=nickName" >
		   	 </select>
		   	 
		  	 <select class="easyui-combobox" name="marketManager" style="width:240px;" data-options="label:'市场经理:' ,required:true" 
				url="/console/user/combobox?duty=市场经理&duty_searchType=like&textField=nickName&valueField=nickName" >
		   	 </select>
		 </div>
		 
		 <div style="margin-bottom:20px">
		 	<select class="easyui-combobox" name="constructionUnit" style="width:240px;" data-options="label:'建设单位:' ,required:true" 
				url="/console/combobox?valueField=name&textField=name&modleName=assistUnit&type_searchType=eq&type=建设单位" >
		 	</select>
		  	<select class="easyui-combobox" name="designUnit" style="width:240px;" data-options="label:'设计单位:' ,required:true" 
				url="/console/combobox?valueField=name&textField=name&modleName=assistUnit&type_searchType=eq&type=设计单位" >
		 	</select>
		 	<select class="easyui-combobox" name="operator" style="width:240px;" data-options="label:'运营商:' ,required:true" 
				url="/console/combobox?valueField=dicName&textField=dicName&modleName=dictionary&pCode=A3&pCode_searchType=eq" >
		   </select>
		 </div>
		 
		 <div style="margin-bottom:20px">
		 	<select class="easyui-combobox" name="subpackage" style="width:240px;" data-options="label:'是否分包:',required:true" >
		 		<option value="是">是</option>
		 		<option value="否">否</option>
		   </select>
		   <input class="easyui-numberbox easyui-validatebox" name="subpackageScale" style="width:240px;" data-options="label:'分包比例:',precision:2,required:true,min:0,max:100,prompt:'输入数值，如3代表3%' " />
		   <!-- 
		   <select class="easyui-combobox" name="subpackageScale" style="width:240px;" data-options="label:'分包比例:',required:true" 
				url="/console/combobox?valueField=dicValue&textField=dicName&modleName=dictionary&pCode=B8&pCode_searchType=eq&sort=dicOrder&order=asc" >
		   </select>
		    -->
		   <input class="easyui-datebox easyui-validatebox" name="pCreateDate" style="width:240px;" data-options="label:'订单日期:'" />
		 </div>
		 
		 <div style="margin-bottom:20px">
		    <select class="easyui-combotreegrid" name="orgNo" style="width:240px;" data-options="label:'组织结构:',panelWidth:300,panelWidth:450,required:true,
	           	idField: 'orgNo', 
	           	missingMessage:'必填项',
				treeField: 'orgName',
				sortName:'orgOrder',
				onSelect:function(row){
					$('input[name=department]').val(row.orgName);	    
				},
				sortOrder:'asc',
	            url:'/console/com.fs.base.pojo.Org/list', 
	            queryParams:{isTreeGrid:'true', treeId:'id', treePid:'parentId' },
	            columns:[[    
	                {field:'orgName',			width:190,	title:'组织名称' }
		         	,{field:'orgType',			width:70,	title:'分类' }
		         	,{field:'orgNo',				width:100,	title:'组织编码' }
		         	,{field:'orgLeaderName',	width:70,	title:'负责人'}
	            ]]"></select>
		 	<select class="easyui-combobox" name="region" style="width:240px;" data-options="label:'区域:' ,required:true" 
				url="/console/combobox?valueField=dicName&textField=dicName&modleName=dictionary&pCode=B5&pCode_searchType=eq" >
		    </select>
		 	<select class="easyui-combobox" name="priority" style="width:240px;" data-options="label:'优先级:'" 
				url="/console/combobox?valueField=dicName&textField=dicName&modleName=dictionary&pCode=B9&pCode_searchType=eq&text=中" >
		    </select>
		 </div>
		  
		 <div style="margin-bottom:20px">
		 	<input class="easyui-textbox easyui-validatebox" name="remark" multiline="true" style="width:725px;height:60px;" 
		 		 data-options="label:'备注:',required:false,validType:'length[0,500]' ,required:true" />
		 </div>
		 
		 <div style="margin-bottom:20px">
		 	<input class="easyui-layuiupload" name="attachment" style="width:725px;" data-options="label:'附件:',upload:{auto:false,height:250}" />
		 </div>
		</form>
	</div>
</body>
</html>